{% extends "base.html" %}

{% set crumbs = [(url('kbadge.badges_list'), _('Badges')), (None, pgettext('DB: badger.Badge.title', badge.title))] %}
{% set styles=('badges',) %}

{% block content %}
<div class="grid_6">
  <h2>
    {% trans badge_name=pgettext('DB: badger.Badge.title', badge.title) %}
      Badge: {{ badge_name }}
    {% endtrans %}
  </h2>

  <dl class="badge-details" data-slug="{{ badge.slug }}">
    {% if badge.image %}
      <dt>{{ _('Image:') }}</dt>
      <dd class="image"><a href="{{ badge.get_absolute_url() }}" class="image"><img src="{{ badge.image.url }}" width="256" height="256" /></a></dd>
    {% endif %}

    {% if badge.description %}
      <dt>{{ _('Description:') }}</dt>
      <dd class="description">{{ pgettext('DB: badger.Badge.description', badge.description) }}</dd>
    {% endif %}

    {% if badge.creator %}
      <dt>{{ _('Creator:') }}</dt>
      <dd><a href="{{ profile_url(badge.creator) }}">{{ display_name(badge.creator) }}</a></dd>
    {% endif %}

    <dt>{{ _('Created:') }}</dt>
    <dd>{{ datetimeformat(badge.created) }}</dd>

    <dt>{{ _('Modified:') }}</dt>
    <dd>{{ datetimeformat(badge.modified) }}</dd>
  </dl>
</div>

{% if award_list %}
  <div class="grid_6">
    <h2>{{ _('Recent awardees') }}</h2>
    <ul class="awardees">
      {% for award in award_list %}
        <li>
          <a href="{{ award.get_absolute_url() }}"><img src="{{ profile_avatar(award.user) }}" alt="" title="{{ award.user }}"></a>
        </li>
      {% endfor %}
    </ul>
  </div>
{% endif %}

{% endblock %}
